<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>浮动</title>
    <style>
        .box1, .box2, .box3 {
            /*float: left;*/
            width: 200px;
            height: 200px;
        }

        .box1 {
            float: left;
            height: 300px;
            background-color: #bfa;
        }
        .box2 {
            float: right;
            height: 400px;
            background-color: orange;
        }

        .box3 {
            float: right;
            background-color: purple;
        }

        .clear {
            clear: both;
        }

        .box4 {
            width: 300px;
            height: 300px;
            background-color: pink;
        }

        .box5 {
            float: left;
            width: 100px;
            height: 100px;
            background-color: skyblue;
        }
    </style>

</head>
<body>
<!--
    1. 传统布局方式
    2. 浮动元素脱离文档流, 向包含块左侧或者右侧浮动
    3，可见框放不下自动换行
    4. 浮动不会超过浮动的兄弟元素, 最多一遍齐
    5. 浮动不会盖住文字, 浮动最初设计就是为了实现图文环绕效果
-->
<div class="box1"></div>
<div class="box2"></div>
<div class="box3"></div>
<div class="clear"></div>
<div class="box4">
    <div class="box5"></div>
    alkjsdjflkajsdlkjfllaksjdklfj
    alkjsdjflkajsdlkjfllaksjdklfj
    alkjsdjflkajsdlkjfllaksjdklfj
    alkjsdjflkajsdlkjfllaksjdklfj
    alkjsdjflkajsdlkjfllaksjdklfj
    alkjsdjflkajsdlkjfllaksjdklfj
    alkjsdjflkajsdlkjfllaksjdklfj
    alkjsdjflkajsdlkjfllaksjdklfj
    alkjsdjflkajsdlkjfllaksjdklfj
    alkjsdjflkajsdlkjfllaksjdklfj
    alkjsdjflkajsdlkjfllaksjdklfj
    alkjsdjflkajsdlkjfllaksjdklfj
</div>
</body>
</html>